# $Id: PKGBUILD 179628 2013-03-08 22:08:23Z eric $
# Maintainer:
# Contributor: Nikolay Rysev <mad.f3ka@gmail.com>

pkgname=fprintd
pkgver=0.5.0
pkgrel=1
pkgdesc="D-Bus service to access fingerprint readers"
arch=(i686 x86_64)
url="http://www.freedesktop.org/wiki/Software/fprint/fprintd"
license=(GPL)
depends=(libfprint dbus-glib polkit)
makedepends=(intltool gtk-doc)
groups=(fprint)
options=(!libtool)
backup=(etc/pam.d/fingerprint-auth)
_snap=V_${pkgver//./_}
source=(http://cgit.freedesktop.org/libfprint/$pkgname/snapshot/$_snap.tar.bz2
        fingerprint-auth)
md5sums=('9db46783dc9d75e84d63a3addbaa0507'
         '8c7da9ccd28ec87dd2572ddfb85d563e')

build() {
  cd $_snap
  ./autogen.sh --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
    --disable-static
  make
}

package() {
  cd $_snap
  make DESTDIR="$pkgdir" pammoddir="/usr/lib/security" install
  install -Dm644 ../fingerprint-auth "$pkgdir/etc/pam.d/fingerprint-auth"
}
